package com.anpxd.erpad.bean

/**
 * Creator : GG
 * Date    : 2018/2/9
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
data class Search(var fromMileage: Int? = null,
                  var toMileage: Int? = null,
                  var fromMileageIndex: Int? = null,
                  var toMileageIndex: Int? = null,
                  var fromCarAge: Int? = null,
                  var toCarAge: Int? = null,
                  var fromCarAgeIndex: Int? = null,
                  var toCarAgeIndex: Int? = null,
                  var fromRetailPrice: Double? = null,
                  var toRetailPrice: Double? = null,
                  var fromRetailPriceIndex: Int? = null,
                  var toRetailPriceIndex: Int? = null,
                  var brandId: Int? = null,
                  var seriesId: Int? = null) {

    fun isEmpty(): Boolean {

        return (fromMileage == null &&
                toMileage == null &&
                fromCarAge == null &&
                toCarAge == null &&
                fromRetailPrice == null &&
                toRetailPrice == null &&
                (brandId == 0 || brandId == null) &&
                (seriesId == 0 || seriesId == null))
    }
}